<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: fabgl::TerminalClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classfabgl_1_1_terminal_class.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classfabgl_1_1_terminal_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">fabgl::TerminalClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>An ANSI-VT100 compatible display terminal.  
 <a href="classfabgl_1_1_terminal_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="terminal_8h_source.html">terminal.h</a>&gt;</code></p>

<p>Inherits Stream.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac74f4efc74b2a878bb976e9668579875"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#ac74f4efc74b2a878bb976e9668579875">available</a> ()</td></tr>
<tr class="memdesc:ac74f4efc74b2a878bb976e9668579875"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of codes available in the keyboard queue.  <a href="#ac74f4efc74b2a878bb976e9668579875">More...</a><br /></td></tr>
<tr class="separator:ac74f4efc74b2a878bb976e9668579875"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7a99734a314d86a403038edc9d1a0ac"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#af7a99734a314d86a403038edc9d1a0ac">availableForWrite</a> ()</td></tr>
<tr class="memdesc:af7a99734a314d86a403038edc9d1a0ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines number of codes that the display input queue can still accept.  <a href="#af7a99734a314d86a403038edc9d1a0ac">More...</a><br /></td></tr>
<tr class="separator:af7a99734a314d86a403038edc9d1a0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a917f58128b42a3d0e26b8a7df031d0f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a917f58128b42a3d0e26b8a7df031d0f8">begin</a> ()</td></tr>
<tr class="memdesc:a917f58128b42a3d0e26b8a7df031d0f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the terminal.  <a href="#a917f58128b42a3d0e26b8a7df031d0f8">More...</a><br /></td></tr>
<tr class="separator:a917f58128b42a3d0e26b8a7df031d0f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d163d94946147078b7b470ea96c04fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a6d163d94946147078b7b470ea96c04fe">clear</a> ()</td></tr>
<tr class="memdesc:a6d163d94946147078b7b470ea96c04fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the screen.  <a href="#a6d163d94946147078b7b470ea96c04fe">More...</a><br /></td></tr>
<tr class="separator:a6d163d94946147078b7b470ea96c04fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae57501a3c38c73e5cf2fe429ac977663"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#ae57501a3c38c73e5cf2fe429ac977663">connectLocally</a> ()</td></tr>
<tr class="memdesc:ae57501a3c38c73e5cf2fe429ac977663"><td class="mdescLeft">&#160;</td><td class="mdescRight">Permits using of terminal locally.  <a href="#ae57501a3c38c73e5cf2fe429ac977663">More...</a><br /></td></tr>
<tr class="separator:ae57501a3c38c73e5cf2fe429ac977663"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3714bb78d3619ef4d0b28f79ab206129"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a3714bb78d3619ef4d0b28f79ab206129">connectSerialPort</a> (HardwareSerial &amp;serialPort, bool autoXONXOFF=true)</td></tr>
<tr class="memdesc:a3714bb78d3619ef4d0b28f79ab206129"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects a remove host using the specified serial port.  <a href="#a3714bb78d3619ef4d0b28f79ab206129">More...</a><br /></td></tr>
<tr class="separator:a3714bb78d3619ef4d0b28f79ab206129"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1897773349da1838dd4e07bf0abb40d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a1897773349da1838dd4e07bf0abb40d6">enableCursor</a> (bool value)</td></tr>
<tr class="memdesc:a1897773349da1838dd4e07bf0abb40d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables cursor.  <a href="#a1897773349da1838dd4e07bf0abb40d6">More...</a><br /></td></tr>
<tr class="separator:a1897773349da1838dd4e07bf0abb40d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadaef0b3c054002816db5be438ebb43a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#aadaef0b3c054002816db5be438ebb43a">end</a> ()</td></tr>
<tr class="memdesc:aadaef0b3c054002816db5be438ebb43a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finalizes the terminal.  <a href="#aadaef0b3c054002816db5be438ebb43a">More...</a><br /></td></tr>
<tr class="separator:aadaef0b3c054002816db5be438ebb43a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29f95f4e068b2a51ba729b8d71f94c92"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a29f95f4e068b2a51ba729b8d71f94c92">flush</a> (bool waitVSync)</td></tr>
<tr class="memdesc:a29f95f4e068b2a51ba729b8d71f94c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for all codes sent to the display has been processed.  <a href="#a29f95f4e068b2a51ba729b8d71f94c92">More...</a><br /></td></tr>
<tr class="separator:a29f95f4e068b2a51ba729b8d71f94c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36fc5e582e7e09f3e80846a0c9fd3079"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a36fc5e582e7e09f3e80846a0c9fd3079">flush</a> ()</td></tr>
<tr class="memdesc:a36fc5e582e7e09f3e80846a0c9fd3079"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for all codes sent to the display has been processed.  <a href="#a36fc5e582e7e09f3e80846a0c9fd3079">More...</a><br /></td></tr>
<tr class="separator:a36fc5e582e7e09f3e80846a0c9fd3079"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f2fcec7df17ecb5843c10cc8154ea57"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a1f2fcec7df17ecb5843c10cc8154ea57">getColumns</a> ()</td></tr>
<tr class="memdesc:a1f2fcec7df17ecb5843c10cc8154ea57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of columns.  <a href="#a1f2fcec7df17ecb5843c10cc8154ea57">More...</a><br /></td></tr>
<tr class="separator:a1f2fcec7df17ecb5843c10cc8154ea57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a935de073dd76476a3df4c8cec530ed47"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a935de073dd76476a3df4c8cec530ed47">getRows</a> ()</td></tr>
<tr class="memdesc:a935de073dd76476a3df4c8cec530ed47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of lines.  <a href="#a935de073dd76476a3df4c8cec530ed47">More...</a><br /></td></tr>
<tr class="separator:a935de073dd76476a3df4c8cec530ed47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39cf1d83672868a619162abd82ff5773"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a39cf1d83672868a619162abd82ff5773">loadFont</a> (FontInfo const *font)</td></tr>
<tr class="memdesc:a39cf1d83672868a619162abd82ff5773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the font to use.  <a href="#a39cf1d83672868a619162abd82ff5773">More...</a><br /></td></tr>
<tr class="separator:a39cf1d83672868a619162abd82ff5773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2b78df23997f931372c838ee231e3d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#ab2b78df23997f931372c838ee231e3d4">localWrite</a> (uint8_t c)</td></tr>
<tr class="memdesc:ab2b78df23997f931372c838ee231e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Injects keys into the keyboard queue.  <a href="#ab2b78df23997f931372c838ee231e3d4">More...</a><br /></td></tr>
<tr class="separator:ab2b78df23997f931372c838ee231e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e1bcfcf9bb7aee1b91e4ebc8667d556"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a1e1bcfcf9bb7aee1b91e4ebc8667d556">localWrite</a> (char const *str)</td></tr>
<tr class="memdesc:a1e1bcfcf9bb7aee1b91e4ebc8667d556"><td class="mdescLeft">&#160;</td><td class="mdescRight">Injects a string of keys into the keyboard queue.  <a href="#a1e1bcfcf9bb7aee1b91e4ebc8667d556">More...</a><br /></td></tr>
<tr class="separator:a1e1bcfcf9bb7aee1b91e4ebc8667d556"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b1cc6ea1ff9f2573d719d724de4d9d3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a5b1cc6ea1ff9f2573d719d724de4d9d3">peek</a> ()</td></tr>
<tr class="memdesc:a5b1cc6ea1ff9f2573d719d724de4d9d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a code from the keyboard without advancing to the next one.  <a href="#a5b1cc6ea1ff9f2573d719d724de4d9d3">More...</a><br /></td></tr>
<tr class="separator:a5b1cc6ea1ff9f2573d719d724de4d9d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fde3f0a918b0ff638598a6ebc73d999"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a1fde3f0a918b0ff638598a6ebc73d999">pollSerialPort</a> ()</td></tr>
<tr class="memdesc:a1fde3f0a918b0ff638598a6ebc73d999"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pools the serial port for incoming data.  <a href="#a1fde3f0a918b0ff638598a6ebc73d999">More...</a><br /></td></tr>
<tr class="separator:a1fde3f0a918b0ff638598a6ebc73d999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0923ba2130e8074038603f57e646cd28"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a0923ba2130e8074038603f57e646cd28">read</a> ()</td></tr>
<tr class="memdesc:a0923ba2130e8074038603f57e646cd28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads codes from keyboard.  <a href="#a0923ba2130e8074038603f57e646cd28">More...</a><br /></td></tr>
<tr class="separator:a0923ba2130e8074038603f57e646cd28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abca478c62f1e2c49798c4ece90b34656"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#abca478c62f1e2c49798c4ece90b34656">setBackgroundColor</a> (<a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a> color, bool setAsDefault=true)</td></tr>
<tr class="memdesc:abca478c62f1e2c49798c4ece90b34656"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the background color.  <a href="#abca478c62f1e2c49798c4ece90b34656">More...</a><br /></td></tr>
<tr class="separator:abca478c62f1e2c49798c4ece90b34656"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0652f03d627508afe15b507e7e7f2712"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a0652f03d627508afe15b507e7e7f2712">setForegroundColor</a> (<a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a> color, bool setAsDefault=true)</td></tr>
<tr class="memdesc:a0652f03d627508afe15b507e7e7f2712"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the foreground color.  <a href="#a0652f03d627508afe15b507e7e7f2712">More...</a><br /></td></tr>
<tr class="separator:a0652f03d627508afe15b507e7e7f2712"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0abd96f5c4075fa9903f2d8d6cfc3d81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a0abd96f5c4075fa9903f2d8d6cfc3d81">setLogStream</a> (Stream &amp;stream)</td></tr>
<tr class="memdesc:a0abd96f5c4075fa9903f2d8d6cfc3d81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the stream where to output debugging logs.  <a href="#a0abd96f5c4075fa9903f2d8d6cfc3d81">More...</a><br /></td></tr>
<tr class="separator:a0abd96f5c4075fa9903f2d8d6cfc3d81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5a5b764c07691443fa7239b3dbd73c6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#af5a5b764c07691443fa7239b3dbd73c6">setTerminalType</a> (TermInfo const *value)</td></tr>
<tr class="memdesc:af5a5b764c07691443fa7239b3dbd73c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the terminal type to emulate specifying conversion tables.  <a href="#af5a5b764c07691443fa7239b3dbd73c6">More...</a><br /></td></tr>
<tr class="separator:af5a5b764c07691443fa7239b3dbd73c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae34626427301c5f15349e15a15d1c495"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#ae34626427301c5f15349e15a15d1c495">setTerminalType</a> (<a class="el" href="group___enumerations.html#ga2d726f689f0c7c127a9327262181bbbd">TermType</a> value)</td></tr>
<tr class="memdesc:ae34626427301c5f15349e15a15d1c495"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the terminal type to emulate.  <a href="#ae34626427301c5f15349e15a15d1c495">More...</a><br /></td></tr>
<tr class="separator:ae34626427301c5f15349e15a15d1c495"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea444850463fdbec78fe099c822d7478"><td class="memItemLeft" align="right" valign="top">TermInfo const  &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#aea444850463fdbec78fe099c822d7478">terminalType</a> ()</td></tr>
<tr class="memdesc:aea444850463fdbec78fe099c822d7478"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines current terminal type.  <a href="#aea444850463fdbec78fe099c822d7478">More...</a><br /></td></tr>
<tr class="separator:aea444850463fdbec78fe099c822d7478"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a809cabdb06dd2127c99ce68822a6d0a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a809cabdb06dd2127c99ce68822a6d0a2">write</a> (const uint8_t *buffer, int size)</td></tr>
<tr class="memdesc:a809cabdb06dd2127c99ce68822a6d0a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends specified number of codes to the display.  <a href="#a809cabdb06dd2127c99ce68822a6d0a2">More...</a><br /></td></tr>
<tr class="separator:a809cabdb06dd2127c99ce68822a6d0a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a537e46d55954ed54ea2da188fe14a4f1"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_terminal_class.html#a537e46d55954ed54ea2da188fe14a4f1">write</a> (uint8_t c)</td></tr>
<tr class="memdesc:a537e46d55954ed54ea2da188fe14a4f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a single code to the display.  <a href="#a537e46d55954ed54ea2da188fe14a4f1">More...</a><br /></td></tr>
<tr class="separator:a537e46d55954ed54ea2da188fe14a4f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An ANSI-VT100 compatible display terminal. </p>
<p>Implements most of common ANSI, VT52, VT100, VT200, VT300, VT420 and VT500 escape codes, like non-CSI codes (RIS, IND, DECID, DECDHL, etc..),<br />
 like CSI codes (private modes, CUP, TBC, etc..), like CSI-SGR codes (bold, italic, blinking, etc...) and like DCS codes (DECRQSS, etc..).<br />
 Supports convertion from PS/2 keyboard virtual keys to ANSI or VT codes (keypad, cursor keys, function keys, etc..).<br />
</p>
<p><a class="el" href="classfabgl_1_1_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">TerminalClass</a> can receive codes to display from Serial Port or it can be controlled directly from the application. In the same way <a class="el" href="classfabgl_1_1_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">TerminalClass</a> can send keyboard codes to a Serial Port or directly to the application.<br />
</p>
<p>For default it supports 80x25 or 132x25 characters at 640x350. However any custom resolution and text buffer size is supported specifying a custom font.<br />
</p>
<p>There are three cursors styles (block, underlined and bar), blinking or not blinking.</p>
<p><a class="el" href="classfabgl_1_1_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">TerminalClass</a> inherits from Stream so applications can use all Stream and Print input and output methods.</p>
<p><a class="el" href="classfabgl_1_1_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">TerminalClass</a> passes 95/110 of VTTEST VT100/VT102 Compatibility Test Score Sheet.</p>
<p>Example 1: </p><pre class="fragment">TerminalClass Terminal;

// Setup 80x25 columns loop-back terminal (send what you type on keyboard to the display)
void setup() {
  Keyboard.begin(GPIO_NUM_33, GPIO_NUM_32);  // GPIOs for keyboard (CLK, DATA)

  // GPIOs for VGA (RED0, RED1, GREEN0, GREEN1, BLUE0, BLUE1, HSYNC, VSYNC)
  VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15);
  VGAController.setResolution(VGA_640x350_70HzAlt1, 640, 350); // 640x350, 80x25 columns

  Terminal.begin();
  Terminal.connectLocally();      // to use Terminal.read(), available(), etc..
  Terminal.enableCursor(true);
}

void loop() {
  if (Terminal.available()) {
    char c = Terminal.read();
    switch (c) {
      case 0x7F:       // DEL -&gt; backspace + ESC[K
        Terminal.write("\b\e[K");
        break;
      case 0x0D:       // CR  -&gt; CR + LF
        Terminal.write("\r\n");
        break;
      case 32 ... 126: // printable chars
        Terminal.write(c);
        break;
    }
  }
}
</pre><p>Example 2: </p><pre class="fragment">TerminalClass Terminal;

// Setup 80x25 columns terminal using UART2 to communicate with the server,
// VGA to display output and PS2 device as keyboard input
void setup() {
  Serial2.begin(115200);

  Keyboard.begin(GPIO_NUM_33, GPIO_NUM_32); // GPIOs for keyboard (CLK, DATA)

  // GPIOs for VGA (RED0, RED1, GREEN0, GREEN1, BLUE0, BLUE1, HSYNC, VSYNC)
  VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15);
  VGAController.setResolution(VGA_640x350_70HzAlt1, 640, 350); // 640x350, 80x25 columns

  Terminal.begin();
  Terminal.connectSerialPort(Serial2);
  Terminal.enableCursor(true);
}

void loop() {
  Terminal.pollSerialPort();
}</pre> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ac74f4efc74b2a878bb976e9668579875"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac74f4efc74b2a878bb976e9668579875">&#9670;&nbsp;</a></span>available()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::available </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the number of codes available in the keyboard queue. </p>
<p>Keyboard queue is available only after <a class="el" href="classfabgl_1_1_terminal_class.html#ae57501a3c38c73e5cf2fe429ac977663" title="Permits using of terminal locally. ">TerminalClass.connectLocally()</a> call.</p>
<dl class="section return"><dt>Returns</dt><dd>The number of codes available to read. </dd></dl>

</div>
</div>
<a id="af7a99734a314d86a403038edc9d1a0ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7a99734a314d86a403038edc9d1a0ac">&#9670;&nbsp;</a></span>availableForWrite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::availableForWrite </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determines number of codes that the display input queue can still accept. </p>
<dl class="section return"><dt>Returns</dt><dd>The size (in characters) of remaining space in the display queue. </dd></dl>

</div>
</div>
<a id="a917f58128b42a3d0e26b8a7df031d0f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a917f58128b42a3d0e26b8a7df031d0f8">&#9670;&nbsp;</a></span>begin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the terminal. </p>
<p>Applications should call this method before any other method call or after resolution has been set. </p>

</div>
</div>
<a id="a6d163d94946147078b7b470ea96c04fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d163d94946147078b7b470ea96c04fe">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the screen. </p>
<p>Clears the screen sending "CSI 2 J" command to the screen.</p>
<p>Example: </p><pre class="fragment">   // Fill the screen with blue
   Terminal.setBackgroundColor(Color::Blue);
   Terminal.clear();</pre> 
</div>
</div>
<a id="ae57501a3c38c73e5cf2fe429ac977663"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae57501a3c38c73e5cf2fe429ac977663">&#9670;&nbsp;</a></span>connectLocally()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::connectLocally </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Permits using of terminal locally. </p>
<p>Create a queue where to put ANSI keys decoded from keyboard or as replies to terminal queries.<br />
 This queue is accessible with <a class="el" href="classfabgl_1_1_terminal_class.html#a0923ba2130e8074038603f57e646cd28" title="Reads codes from keyboard. ">read()</a>, <a class="el" href="classfabgl_1_1_terminal_class.html#ac74f4efc74b2a878bb976e9668579875" title="Gets the number of codes available in the keyboard queue. ">available()</a> and <a class="el" href="classfabgl_1_1_terminal_class.html#a5b1cc6ea1ff9f2573d719d724de4d9d3" title="Reads a code from the keyboard without advancing to the next one. ">peek()</a> methods.</p>
<p>Example: </p><pre class="fragment">   Terminal.begin();
   Terminal.connectLocally();
   // from here you can use Terminal.read() to receive keys from keyboard
   // and Terminal.write() to control the display.</pre> 
</div>
</div>
<a id="a3714bb78d3619ef4d0b28f79ab206129"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3714bb78d3619ef4d0b28f79ab206129">&#9670;&nbsp;</a></span>connectSerialPort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::connectSerialPort </td>
          <td>(</td>
          <td class="paramtype">HardwareSerial &amp;&#160;</td>
          <td class="paramname"><em>serialPort</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>autoXONXOFF</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects a remove host using the specified serial port. </p>
<p>When serial port is set, the typed keys on PS/2 keyboard are encoded as ANSI/VT100 codes and then sent to the specified serial port.<br />
 Also replies to terminal queries like terminal identification, cursor position, etc.. will be sent to the serial port.<br />
 Call <a class="el" href="classfabgl_1_1_terminal_class.html#a1fde3f0a918b0ff638598a6ebc73d999" title="Pools the serial port for incoming data. ">TerminalClass.pollSerialPort()</a> to send codes from serial port to the display.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serialPort</td><td>The serial port to use. </td></tr>
    <tr><td class="paramname">autoXONXOFF</td><td>If true uses software flow control (XON/XOFF).</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">  Terminal.begin();
  Terminal.connectSerialPort(Serial);</pre> 
</div>
</div>
<a id="a1897773349da1838dd4e07bf0abb40d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1897773349da1838dd4e07bf0abb40d6">&#9670;&nbsp;</a></span>enableCursor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::enableCursor </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables or disables cursor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>If true the cursor becomes visible. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aadaef0b3c054002816db5be438ebb43a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadaef0b3c054002816db5be438ebb43a">&#9670;&nbsp;</a></span>end()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finalizes the terminal. </p>
<p>Applications should call this method before screen resolution changes. </p>

</div>
</div>
<a id="a29f95f4e068b2a51ba729b8d71f94c92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29f95f4e068b2a51ba729b8d71f94c92">&#9670;&nbsp;</a></span>flush() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::flush </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>waitVSync</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Waits for all codes sent to the display has been processed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">waitVSync</td><td>If true codes are processed during screen retrace time (starting from VSync up to about first top visible row). When false all messages are processed immediately. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a36fc5e582e7e09f3e80846a0c9fd3079"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36fc5e582e7e09f3e80846a0c9fd3079">&#9670;&nbsp;</a></span>flush() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::flush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Waits for all codes sent to the display has been processed. </p>
<p>Codes are processed during screen retrace time (starting from VSync up to about first top visible row). </p>

</div>
</div>
<a id="a1f2fcec7df17ecb5843c10cc8154ea57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f2fcec7df17ecb5843c10cc8154ea57">&#9670;&nbsp;</a></span>getColumns()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::getColumns </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of columns. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of columns (in characters). </dd></dl>

</div>
</div>
<a id="a935de073dd76476a3df4c8cec530ed47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a935de073dd76476a3df4c8cec530ed47">&#9670;&nbsp;</a></span>getRows()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::getRows </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of lines. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of lines (in characters). </dd></dl>

</div>
</div>
<a id="a39cf1d83672868a619162abd82ff5773"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39cf1d83672868a619162abd82ff5773">&#9670;&nbsp;</a></span>loadFont()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::loadFont </td>
          <td>(</td>
          <td class="paramtype">FontInfo const *&#160;</td>
          <td class="paramname"><em>font</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the font to use. </p>
<p>Terminal automatically choises the best font considering screen resolution and required number of columns and rows.<br />
 Particular cases require setting custom fonts, so applications can use <a class="el" href="classfabgl_1_1_terminal_class.html#a39cf1d83672868a619162abd82ff5773" title="Sets the font to use. ">TerminalClass.loadFont()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">font</td><td>Specifies font info for the font to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab2b78df23997f931372c838ee231e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2b78df23997f931372c838ee231e3d4">&#9670;&nbsp;</a></span>localWrite() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::localWrite </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Injects keys into the keyboard queue. </p>
<p>Characters added with <a class="el" href="classfabgl_1_1_terminal_class.html#ab2b78df23997f931372c838ee231e3d4" title="Injects keys into the keyboard queue. ">localWrite()</a> will be received with <a class="el" href="classfabgl_1_1_terminal_class.html#a0923ba2130e8074038603f57e646cd28" title="Reads codes from keyboard. ">read()</a>, <a class="el" href="classfabgl_1_1_terminal_class.html#ac74f4efc74b2a878bb976e9668579875" title="Gets the number of codes available in the keyboard queue. ">available()</a> and <a class="el" href="classfabgl_1_1_terminal_class.html#a5b1cc6ea1ff9f2573d719d724de4d9d3" title="Reads a code from the keyboard without advancing to the next one. ">peek()</a> methods.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>ASCII code to inject into the queue. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1e1bcfcf9bb7aee1b91e4ebc8667d556"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e1bcfcf9bb7aee1b91e4ebc8667d556">&#9670;&nbsp;</a></span>localWrite() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::localWrite </td>
          <td>(</td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Injects a string of keys into the keyboard queue. </p>
<p>Characters added with <a class="el" href="classfabgl_1_1_terminal_class.html#ab2b78df23997f931372c838ee231e3d4" title="Injects keys into the keyboard queue. ">localWrite()</a> will be received with <a class="el" href="classfabgl_1_1_terminal_class.html#a0923ba2130e8074038603f57e646cd28" title="Reads codes from keyboard. ">read()</a>, <a class="el" href="classfabgl_1_1_terminal_class.html#ac74f4efc74b2a878bb976e9668579875" title="Gets the number of codes available in the keyboard queue. ">available()</a> and <a class="el" href="classfabgl_1_1_terminal_class.html#a5b1cc6ea1ff9f2573d719d724de4d9d3" title="Reads a code from the keyboard without advancing to the next one. ">peek()</a> methods.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>A string of ASCII codes to inject into the queue. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5b1cc6ea1ff9f2573d719d724de4d9d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b1cc6ea1ff9f2573d719d724de4d9d3">&#9670;&nbsp;</a></span>peek()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::peek </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads a code from the keyboard without advancing to the next one. </p>
<p>Keyboard queue is available only after <a class="el" href="classfabgl_1_1_terminal_class.html#ae57501a3c38c73e5cf2fe429ac977663" title="Permits using of terminal locally. ">TerminalClass.connectLocally()</a> call.</p>
<dl class="section return"><dt>Returns</dt><dd>The next code, or -1 if none is available. </dd></dl>

</div>
</div>
<a id="a1fde3f0a918b0ff638598a6ebc73d999"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fde3f0a918b0ff638598a6ebc73d999">&#9670;&nbsp;</a></span>pollSerialPort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::pollSerialPort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pools the serial port for incoming data. </p>
<p>Tnis method needs to be called in the application main loop to check if new data is coming from the current serial port (specified using <a class="el" href="classfabgl_1_1_terminal_class.html#a3714bb78d3619ef4d0b28f79ab206129" title="Connects a remove host using the specified serial port. ">TerminalClass.connectSerialPort</a>).</p>
<p>Example: </p><pre class="fragment">  void loop()
  {
    Terminal.pollSerialPort();
  }</pre> 
</div>
</div>
<a id="a0923ba2130e8074038603f57e646cd28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0923ba2130e8074038603f57e646cd28">&#9670;&nbsp;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads codes from keyboard. </p>
<p>Keyboard queue is available only after <a class="el" href="classfabgl_1_1_terminal_class.html#ae57501a3c38c73e5cf2fe429ac977663" title="Permits using of terminal locally. ">TerminalClass.connectLocally()</a> call.</p>
<dl class="section return"><dt>Returns</dt><dd>The first code of incoming data available (or -1 if no data is available). </dd></dl>

</div>
</div>
<a id="abca478c62f1e2c49798c4ece90b34656"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abca478c62f1e2c49798c4ece90b34656">&#9670;&nbsp;</a></span>setBackgroundColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::setBackgroundColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a>&#160;</td>
          <td class="paramname"><em>color</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>setAsDefault</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the background color. </p>
<p>Sets the background color sending an SGR ANSI code and optionally the default background color (used resetting the terminal).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Current or default background color. </td></tr>
    <tr><td class="paramname">setAsDefault</td><td>If true the specified color is also used as default.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">   Terminal.setBackgroundColor(Color::Black);</pre> 
</div>
</div>
<a id="a0652f03d627508afe15b507e7e7f2712"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0652f03d627508afe15b507e7e7f2712">&#9670;&nbsp;</a></span>setForegroundColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::setForegroundColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a>&#160;</td>
          <td class="paramname"><em>color</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>setAsDefault</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the foreground color. </p>
<p>Sets the foreground color sending an SGR ANSI code and optionally the default foreground color (used resetting the terminal).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Current or default foreground color. </td></tr>
    <tr><td class="paramname">setAsDefault</td><td>If true the specified color is also used as default.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">   Terminal.setForegroundColor(Color::White);</pre> 
</div>
</div>
<a id="a0abd96f5c4075fa9903f2d8d6cfc3d81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0abd96f5c4075fa9903f2d8d6cfc3d81">&#9670;&nbsp;</a></span>setLogStream()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::setLogStream </td>
          <td>(</td>
          <td class="paramtype">Stream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the stream where to output debugging logs. </p>
<p>Logging info sents to the logging stream are detailed by FABGLIB_TERMINAL_DEBUG_REPORT_.... macros in <a class="el" href="fabglconf_8h.html" title="This file contains FabGL library configuration settings, like number of supported colors...">fabglconf.h</a> configuration file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>The logging stream.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">   Serial.begin(115200);
   Terminal.begin();
   Terminal.setLogStream(Serial);</pre> 
</div>
</div>
<a id="af5a5b764c07691443fa7239b3dbd73c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5a5b764c07691443fa7239b3dbd73c6">&#9670;&nbsp;</a></span>setTerminalType() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::setTerminalType </td>
          <td>(</td>
          <td class="paramtype">TermInfo const *&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the terminal type to emulate specifying conversion tables. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Conversione tables for the terminal to emulate. nullptr = native ANSI/VT terminal.</td></tr>
  </table>
  </dd>
</dl>
<p>Default and native is ANSI/VT100 mode. Other terminals are emulated translating to native mode. </p>

</div>
</div>
<a id="ae34626427301c5f15349e15a15d1c495"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae34626427301c5f15349e15a15d1c495">&#9670;&nbsp;</a></span>setTerminalType() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::TerminalClass::setTerminalType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___enumerations.html#ga2d726f689f0c7c127a9327262181bbbd">TermType</a>&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the terminal type to emulate. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>A terminal to emulate</td></tr>
  </table>
  </dd>
</dl>
<p>Default and native is ANSI/VT100 mode. Other terminals are emulated translating to native mode. </p>

</div>
</div>
<a id="aea444850463fdbec78fe099c822d7478"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea444850463fdbec78fe099c822d7478">&#9670;&nbsp;</a></span>terminalType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TermInfo const&amp; fabgl::TerminalClass::terminalType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines current terminal type. </p>
<dl class="section return"><dt>Returns</dt><dd>Terminal type </dd></dl>

</div>
</div>
<a id="a809cabdb06dd2127c99ce68822a6d0a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a809cabdb06dd2127c99ce68822a6d0a2">&#9670;&nbsp;</a></span>write() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::TerminalClass::write </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends specified number of codes to the display. </p>
<p>Codes can be ANSI/VT codes or ASCII characters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>Pointer to codes buffer. </td></tr>
    <tr><td class="paramname">size</td><td>Number of codes in the buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of codes written.</dd></dl>
<p>Example: </p><pre class="fragment">   // Clear the screen and print "Hello World!"
   Terminal.write("\e[2J", 4);
   Terminal.write("Hellow World!\r\n", 15);

   // The same without size specified
   Terminal.write("\e[2J");
   Terminal.write("Hellow World!\r\n");</pre> 
</div>
</div>
<a id="a537e46d55954ed54ea2da188fe14a4f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a537e46d55954ed54ea2da188fe14a4f1">&#9670;&nbsp;</a></span>write() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t fabgl::TerminalClass::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a single code to the display. </p>
<p>Code can be only of the ANSI/VT codes or ASCII characters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>The code to send.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of codes written. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="terminal_8h_source.html">terminal.h</a></li>
<li>terminal.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_terminal_class.html">TerminalClass</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
